<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>30日 (_key_过渡transition 转换transform 开关demo) | 学习笔记</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        <meta name="author" content="xylim">
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-expandable-chapters-interactive/expandable-chapters.css">
        
    
        
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-sectionx/sectionx.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-splitter/splitter.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../../2018/October/8.html" />
    
    
    <link rel="prev" href="../../2018/September/27.html" />
    

        
    </head>
    <body>
        
        
    <div class="book"
        data-level="1.8"
        data-chapter-title="30日 (_key_过渡transition 转换transform 开关demo)"
        data-filepath="2018/September/30.md"
        data-basepath="../.."
        data-revision="Wed Oct 10 2018 10:28:01 GMT+0800 (中国标准时间)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        Introduction
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="2018/September/九月份September.html">
            
                
                    <a href="../../2018/September/九月份September.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        九月份 September
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="2018/September/18.html">
            
                
                    <a href="../../2018/September/18.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        18日 (_key_html标签入门介绍)
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="2018/September/19.html">
            
                
                    <a href="../../2018/September/19.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        19日 (_key_git提交 markdown语法)
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="2018/September/20.html">
            
                
                    <a href="../../2018/September/20.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.</b>
                        
                        20日 (_key_多媒体 ifram)
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="2018/September/21.html">
            
                
                    <a href="../../2018/September/21.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.</b>
                        
                        21日 (_key_盒子模型 css选择器)
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="2018/September/25.html">
            
                
                    <a href="../../2018/September/25.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.5.</b>
                        
                        25日 (_key_字体 icon 边框画圆、三角 伪元素选择器 行高 垂直对齐)
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="2018/September/26.html">
            
                
                    <a href="../../2018/September/26.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.6.</b>
                        
                        26日 (_key_浮动 文本处理 行内块空隙处理)
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="2018/September/27.html">
            
                
                    <a href="../../2018/September/27.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.7.</b>
                        
                        27日 (_key_定位 渐变色)
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="1.8" data-path="2018/September/30.html">
            
                
                    <a href="../../2018/September/30.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.8.</b>
                        
                        30日 (_key_过渡transition 转换transform 开关demo)
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="2018/October/十月份October.html">
            
            <span><b>2.</b> 十月份 October</span>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="2018/October/8.html">
            
                
                    <a href="../../2018/October/8.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        8日 (_key_动画 sass)
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="2018/October/9.html">
            
                
                    <a href="../../2018/October/9.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        9日 (_key_滤镜 git版本回退)
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="2018/October/10.html">
            
                
                    <a href="../../2018/October/10.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.</b>
                        
                        10日 (_key_XXX)
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../../" >学习笔记</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <html><head></head><body><h1 id="30&#x65E5;">30&#x65E5;</h1>
<p><br></p>
<h4 id="&#x91CD;&#x70B9;&#x77E5;&#x8BC6;">&#x91CD;&#x70B9;&#x77E5;&#x8BC6;</h4>
<h6 id="&#x76F8;&#x5173;&#x77E5;&#x8BC6;&#xFF1A;&#x8FC7;&#x6E21;transition-&#x8F6C;&#x6362;transform-&#x5F00;&#x5173;demo">&#x76F8;&#x5173;&#x77E5;&#x8BC6;&#xFF1A;&#x8FC7;&#x6E21;transition &#x8F6C;&#x6362;transform &#x5F00;&#x5173;demo</h6>
<p><br></p>
<sec data-title="&#x8FC7;&#x6E21;transition" data-id="section0" data-show="true"><div class="panel panel-default"><div class="panel-heading"><h2>&#x8FC7;&#x6E21;transition<a class="pull-right section atTitle btn btn-default" target="section0"><span class="fa fa-angle-up"></span></a></h2></div><div class="panel-collapse in" id="section0"><div class="panel-body">
<pre><code>
&lt;!DOCTYPE html&gt;
&lt;html&gt;
    &lt;head&gt;
        &lt;meta charset=&quot;utf-8&quot; /&gt;
        &lt;title&gt;&#x8FC7;&#x6E21;&lt;/title&gt;
        &lt;style type=&quot;text/css&quot;&gt;
            .link{
                width: 130px;
                height: 50px;
                line-height: 50px;
                text-align: center;
                background-color: skyblue;
                color: white;
                border: 1px solid skyblue;
                /*&#x6539;&#x53D8;&#x5149;&#x6807;*/
                cursor: pointer;
                /*&#x8FC7;&#x6E21;&#x6548;&#x679C;
                     &#x987A;&#x5E8F;&#xFF1A;&#x5C5E;&#x6027; &#x65F6;&#x957F; &#x901F;&#x5EA6; &#x5EF6;&#x65F6;
                 * */
                transition: background-color 500ms;
                /*&#x6240;&#x6709;&#x5C5E;&#x6027;&#x90FD;&#x662F;&#x7528;&#x8FC7;&#x6E21;*/
                transition: all 1s;
                /*&#x8FD0;&#x52A8;&#x901F;&#x5EA6;&#xFF1A; &#x8D1D;&#x585E;&#x5C14;&#x66F2;&#x7EBF;
                 *         linear&#x5300;&#x901F; 
                 *         ease-in&#x52A0;&#x901F; 
                 *         ease-out&#x51CF;&#x901F; 
                 *         ease-in-out&#x5148;&#x5FEB;&#x540E;&#x6162;
                 * */
                transition-timing-function: linear;
                /*&#x5EF6;&#x8FDF;
                 * &#x5F00;&#x59CB;&#x6267;&#x884C;&#x8FC7;&#x6E21;&#x524D;&#x7684;&#x65F6;&#x95F4;
                 * &#x53EF;&#x4EE5;&#x5206;&#x522B;&#x8BBE;&#x7F6E;
                 */
                transition-delay: 1s;

                transition-duration: ;
                transition-property: ;
            }

            .link:hover{
                background-color: white;
                color: skyblue;
                width: 500px;
            }
        &lt;/style&gt;
    &lt;/head&gt;
    &lt;body&gt;
        &lt;div class=&quot;link&quot;&gt;
            &#x6295;&#x8D44;&#x6848;&#x4F8B;
        &lt;/div&gt;
    &lt;/body&gt;
&lt;/html&gt;
</code></pre></div></div></div></sec>
<sec data-title="&#x8F6C;&#x6362;transform" data-id="section1" data-show="true"><div class="panel panel-default"><div class="panel-heading"><h2>&#x8F6C;&#x6362;transform<a class="pull-right section atTitle btn btn-default" target="section1"><span class="fa fa-angle-up"></span></a></h2></div><div class="panel-collapse in" id="section1"><div class="panel-body">
<pre><code>
&lt;!DOCTYPE html&gt;
&lt;html&gt;
    &lt;head&gt;
        &lt;meta charset=&quot;UTF-8&quot;&gt;
        &lt;title&gt;&lt;/title&gt;
        &lt;style type=&quot;text/css&quot;&gt;
            h1{
                margin: 0;
            }
            /*
             * &#x53D8;&#x5F62;&#xFF1A;
             *         &#x5E76;&#x6CA1;&#x6709;&#x6539;&#x53D8;&#x5143;&#x7D20;&#x7684;&#x5F62;&#x6001;&#xFF0C;&#x53EA;&#x662F;UI&#x4E0A;&#x7684;&#x4E00;&#x4E9B;&#x6548;&#x679C;&#xFF0C;&#x4E0D;&#x5F71;&#x54CD;&#x5E03;&#x5C40;
             */
            .box{
                width: 100px;
                height: 100px;
                text-align: center;
                background: deepskyblue;
                transition: all 1s;

            }
            .box:hover{
                /*&#x5E73;&#x79FB;*/
                /*transform: translate(80px,50px);*/

                /*&#x7F29;&#x653E;  &#x6CE8;&#x610F;&#x5185;&#x5BB9;&#x53D8;&#x5F62;&#x7684;&#x60C5;&#x51B5;*/
                /*transform:scale(1.5) ;*/

                /*&#x65CB;&#x8F6C;  &#x9ED8;&#x8BA4;z&#x8F74;&#x65CB;&#x8F6C;*/
                /*transform: rotate(90deg);*/

                /* &#x659C;&#x5207; */
                /*transform: skew(30deg);*/

                /* &#x53D8;&#x5F62;&#x7684;&#x4E2D;&#x5FC3;  css&#x9ED8;&#x8BA4;&#x5728;&#x5BB9;&#x5668;&#x7684;&#x4E2D;&#x5FC3;  &#x5176;&#x4ED6;&#x5F88;&#x591A;&#x5173;&#x4E8E;&#x56FE;&#x5F62;&#x754C;&#x9762;&#xFF0C;&#x4F8B;&#x5982;svg&#x5728;&#x53F3;&#x4E0A;&#x89D2; */
                transform-origin: left top;
                transform: rotate(30deg) scale(1.5);
            }

            #saizi{
                width: 100px;
                height: 100px;
                line-height: 100px;
                text-align: center;
                /* 3D &#x6A21;&#x5F0F; */
                transform-style: preserve-3d;
                transition: all 3s;
            }
            #saizi:hover{
                transform: rotateX(360deg) rotateY(360deg) ;
            }
            .side{
                width: 100%;
                height: 100%;
                position: absolute;
                top: 0;
                left: 0;
                /*opacity: 0.5;*/

            }
            .front{
                transform: translateZ(50px);
                background: darkturquoise;
            }
            .back{
                transform: rotateY(180deg) translateZ(50px);
                background: palegoldenrod;
            }
            .left{
                transform: rotateY(90deg) translateZ(50px);
                background: peachpuff;
            }
            .right{
                transform: rotateY(-90deg) translateZ(50px);
                background: brown;
            }
            .top{
                transform: rotateX(-90deg) translateZ(50px);
                background: darkmagenta;
            }
            .bottom{
                transform: rotateX(90deg) translateZ(50px);
                background: darkgray;
            }


            /*
                 &#x8BBA;&#x9AB0;&#x5B50;&#x7684;&#x5F62;&#x6210;
                 1. &#x6211;&#x4EEC;&#x5148;&#x8BA4;&#x8BC6;3d&#x6982;&#x5FF5;
                 2. &#x7406;&#x89E3; rotateX rotateY rotateZ
                 3. &#x7406;&#x89E3; translateX translateY translateZ
                 4. &#x8BE5;&#x7F16;&#x7A0B;&#x601D;&#x8DEF;&#xFF1A;
                     &#x5404;&#x4E2A;&#x65B9;&#x5411;&#x65CB;&#x8F6C;&#x6CBF;&#x7740;&#x5BF9;&#x5E94;&#x8F74;&#x65CB;&#x8F6C;&#x81F3;&#x4E0D;&#x540C;&#x65B9;&#x5411;&#x540E; &#x786E;&#x5B9A;&#x5176;&#x65CB;&#x8F6C;&#x540E;&#x6240;&#x5728;&#x9762;&#x7684;&#x65B9;&#x5411;&#xFF08;rotateX rotateY rotateZ&#xFF09;
                     &#x5176;&#x4E2D; &#x53EA;&#x65CB;&#x8F6C;&#x81F3;&#x76F8;&#x5E94;&#x65B9;&#x5411;&#x662F;&#x8FDC;&#x8FDC;&#x4E0D;&#x591F;&#x7684; &#x56E0;&#x4E3A;&#x8FD9;&#x65F6;&#x5019;&#x4ED6;&#x4EEC;&#x4F1A;&#x9ECF;&#x5728;&#x4E00;&#x5757; &#x9700;&#x8981;&#x76F8;&#x5E94;&#x7684;&#x201C;&#x9AD8;&#x5EA6;&#x201D;&#x6491;&#x5F00;
                     &#x5176;&#x4E2D;&#x7684;&#x9AD8;&#x5EA6; &#x5373;Z&#x8F74;&#x957F;&#x5EA6; &#x6240;&#x4EE5;&#x8981;&#x6CBF;&#x7740;Z&#x8F74;&#x79FB;&#x52A8;&#x76F8;&#x5E94;&#x7684;&#x957F;&#x5EA6;&#xFF08;translateZ&#xFF09;
                 5. &#x5176;&#x4E2D;     x&#x6B63;&#x65B9;&#x5411; &#x5C4F;&#x5E55;&#x53F3;&#x65B9; 
                         y&#x6B63;&#x65B9;&#x5411; &#x5C4F;&#x5E55;&#x4E0B;&#x65B9;    
                         z&#x6B63;&#x65B9;&#x5411; &#x5C4F;&#x5E55;&#x5916;&#x65B9;  
                 6. &#x76F8;&#x5BF9;&#x5BF9;&#x8C61;&#x662F;&#x5B83;&#x672C;&#x8EAB;
             */
        &lt;/style&gt;
    &lt;/head&gt;
    &lt;body&gt;
        &lt;div class=&quot;box&quot;&gt;box&lt;/div&gt;
        &lt;h1&gt;TITLE&lt;/h1&gt;

        &lt;div id=&quot;saizi&quot;&gt;
            &lt;div class=&quot;side top&quot;&gt;1&lt;/div&gt;
            &lt;div class=&quot;side bottom&quot;&gt;2&lt;/div&gt;
            &lt;div class=&quot;side left&quot;&gt;3&lt;/div&gt;
            &lt;div class=&quot;side right&quot;&gt;4&lt;/div&gt;
            &lt;div class=&quot;side front&quot;&gt;5&lt;/div&gt;
            &lt;div class=&quot;side back&quot;&gt;6&lt;/div&gt;
        &lt;/div&gt;
    &lt;/body&gt;
&lt;/html&gt;
</code></pre></div></div></div></sec>
<sec data-title="&#x5F00;&#x5173;demo" data-id="section2" data-show="true"><div class="panel panel-default"><div class="panel-heading"><h2>&#x5F00;&#x5173;demo<a class="pull-right section atTitle btn btn-default" target="section2"><span class="fa fa-angle-up"></span></a></h2></div><div class="panel-collapse in" id="section2"><div class="panel-body">
<pre><code>
&lt;!DOCTYPE html&gt;
&lt;html&gt;
    &lt;head&gt;
        &lt;meta charset=&quot;UTF-8&quot;&gt;
        &lt;title&gt;&lt;/title&gt;

        &lt;style type=&quot;text/css&quot;&gt;

            #s-label{
                display: inline-block;
                width: 120px;
                height: 60px;
                border:2px solid red;
                border-radius: 32px;
                position: relative;
            }

            #s-label span{
                display: inline-block;
                width: 60px;
                height: 60px;
                left: 0;
                border-radius: 50%;
                background-color: #f2dd68;
                position: absolute;

                transition:all 1s;
            }
            #switch{
                display: none;
            }
            label{
                background: deepskyblue;
            }
            #switch:checked+label{
                background: #a4bf4d;
            }
            #switch:checked+label span{
                left: 60px;

            }

        &lt;/style&gt;


    &lt;/head&gt;
    &lt;body&gt;

        &lt;!-- checkbox &#x590D;&#x9009;&#x6846; &#x4EE3;&#x8868;&#x5F00;&#x5173;&#x7684;&#x72B6;&#x6001;--&gt;
        &lt;input type=&quot;checkbox&quot; name=&quot;&quot; id=&quot;switch&quot; value=&quot;&quot; /&gt;
        &lt;label for=&quot;switch&quot; id=&quot;s-label&quot;&gt;

            &lt;span&gt;&lt;/span&gt;

        &lt;/label&gt;

    &lt;/body&gt;
&lt;/html&gt;
</code></pre></div></div></div></sec>
</body></html>
                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../../2018/September/27.html" class="navigation navigation-prev " aria-label="Previous page: 27日 (_key_定位 渐变色)"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../../2018/October/8.html" class="navigation navigation-next " aria-label="Next page: 8日 (_key_动画 sass)"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../../gitbook/app.js"></script>

    
    <script src="../../gitbook/plugins/gitbook-plugin-expandable-chapters-interactive/expandable-chapters.js"></script>
    

    
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-sectionx/sectionx.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-splitter/splitter.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"expandable-chapters-interactive":{},"sectionx":{},"splitter":{},"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
